<template>
	<div>
		<div class="container" :style='{"minHeight":"100vh","alignItems":"center","background":"url(http://codegen.caihongy.cn/20231210/0fee9409214b41bfb94d032d3e1d9dbc.webp)","display":"flex","width":"100%","backgroundSize":"100% 100%","backgroundPosition":"center","backgroundRepeat":"no-repeat","justifyContent":"center"}'>
			<el-form v-if="pageFlag=='register'" :style='{"border":"10px solid #39b6e2","padding":"90px 60px 40px","boxShadow":"0px 1px 9px #21667f80","margin":"60px 0 20px","borderRadius":"30px","flexWrap":"wrap","background":"url(http://codegen.caihongy.cn/20231218/84c7bb0e65334a18b669a33041d75403.png) no-repeat center top / 100% auto,url(http://codegen.caihongy.cn/20231218/83bfa299c46a43d48aade06fcb1d9431.png) no-repeat center bottom / 100% auto,url(http://codegen.caihongy.cn/20231218/67cb8922dcdb4603ae570289e0708697.png) repeat-y center 10px / 100% auto,#fff","display":"flex","width":"900px","position":"relative","height":"auto"}' ref="rgsForm" class="rgs-form" :model="rgsForm" :rules="rules">
				<div v-if="true" :style='{"margin":"0 auto","color":"#000000","top":"-33px","textAlign":"center","background":"url(http://codegen.caihongy.cn/20231218/a7b3487a278d4db6990f0207171527db.png) no-repeat center top / 100%  100% ","width":"800px","lineHeight":"90px","fontSize":"22px","position":"absolute","fontWeight":"600","height":"89px"}' class="title">学习营活动管理平台注册</div>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='xueyuan'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('xueyuanxuehao')?'required':''">学员学号：</div>
					<el-input  v-model="ruleForm.xueyuanxuehao"  autocomplete="off" placeholder="学员学号"  type="text"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='xueyuan'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('mima')?'required':''">密码：</div>
					<el-input  v-model="ruleForm.mima"  autocomplete="off" placeholder="密码"  type="password"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='xueyuan'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('mima')?'required':''">确认密码：</div>
					<el-input  v-model="ruleForm.mima2" autocomplete="off" placeholder="确认密码" type="password" />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='xueyuan'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('xueyuanxingming')?'required':''">学员姓名：</div>
					<el-input  v-model="ruleForm.xueyuanxingming"  autocomplete="off" placeholder="学员姓名"  type="text"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='xueyuan'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('xingbie')?'required':''">性别：</div>
                    <el-select v-model="ruleForm.xingbie" placeholder="请选择性别" >
                        <el-option
                            v-for="(item,index) in xueyuanxingbieOptions"
                            v-bind:key="index"
                            :label="item"
                            :value="item">
                        </el-option>
                    </el-select>
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='xueyuan'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('shouji')?'required':''">手机：</div>
					<el-input  v-model="ruleForm.shouji"  autocomplete="off" placeholder="手机"  type="text"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='xueyuan'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('banjimingcheng')?'required':''">班级名称：</div>
                    <el-select v-model="ruleForm.banjimingcheng" placeholder="请选择班级名称" >
                        <el-option
                            v-for="(item,index) in xueyuanbanjimingchengOptions"
                            v-bind:key="index"
                            :label="item"
                            :value="item">
                        </el-option>
                    </el-select>
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='xueyuan'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('touxiang')?'required':''">头像：</div>
                    <file-upload
                        tip="点击上传头像"
                        action="file/upload"
                        :limit="3"
                        :multiple="true"
                        :fileUrls="ruleForm.touxiang?ruleForm.touxiang:''"
                        @change="xueyuantouxiangUploadChange"
                    ></file-upload>
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='shoukejiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('jiaoshigonghao')?'required':''">教师工号：</div>
					<el-input  v-model="ruleForm.jiaoshigonghao"  autocomplete="off" placeholder="教师工号"  type="text"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='shoukejiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('mima')?'required':''">密码：</div>
					<el-input  v-model="ruleForm.mima"  autocomplete="off" placeholder="密码"  type="password"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='shoukejiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('mima')?'required':''">确认密码：</div>
					<el-input  v-model="ruleForm.mima2" autocomplete="off" placeholder="确认密码" type="password" />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='shoukejiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('jiaoshixingming')?'required':''">教师姓名：</div>
					<el-input  v-model="ruleForm.jiaoshixingming"  autocomplete="off" placeholder="教师姓名"  type="text"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='shoukejiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('xingbie')?'required':''">性别：</div>
                    <el-select v-model="ruleForm.xingbie" placeholder="请选择性别" >
                        <el-option
                            v-for="(item,index) in shoukejiaoshixingbieOptions"
                            v-bind:key="index"
                            :label="item"
                            :value="item">
                        </el-option>
                    </el-select>
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='shoukejiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('shouji')?'required':''">手机：</div>
					<el-input  v-model="ruleForm.shouji"  autocomplete="off" placeholder="手机"  type="text"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='shoukejiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('banjimingcheng')?'required':''">班级名称：</div>
                    <el-select v-model="ruleForm.banjimingcheng" placeholder="请选择班级名称" >
                        <el-option
                            v-for="(item,index) in shoukejiaoshibanjimingchengOptions"
                            v-bind:key="index"
                            :label="item"
                            :value="item">
                        </el-option>
                    </el-select>
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='shoukejiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('touxiang')?'required':''">头像：</div>
                    <file-upload
                        tip="点击上传头像"
                        action="file/upload"
                        :limit="3"
                        :multiple="true"
                        :fileUrls="ruleForm.touxiang?ruleForm.touxiang:''"
                        @change="shoukejiaoshitouxiangUploadChange"
                    ></file-upload>
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='jiaofujiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('jiaofugonghao')?'required':''">教辅工号：</div>
					<el-input  v-model="ruleForm.jiaofugonghao"  autocomplete="off" placeholder="教辅工号"  type="text"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='jiaofujiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('mima')?'required':''">密码：</div>
					<el-input  v-model="ruleForm.mima"  autocomplete="off" placeholder="密码"  type="password"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='jiaofujiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('mima')?'required':''">确认密码：</div>
					<el-input  v-model="ruleForm.mima2" autocomplete="off" placeholder="确认密码" type="password" />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='jiaofujiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('jiaofuxingming')?'required':''">教辅姓名：</div>
					<el-input  v-model="ruleForm.jiaofuxingming"  autocomplete="off" placeholder="教辅姓名"  type="text"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='jiaofujiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('xingbie')?'required':''">性别：</div>
                    <el-select v-model="ruleForm.xingbie" placeholder="请选择性别" >
                        <el-option
                            v-for="(item,index) in jiaofujiaoshixingbieOptions"
                            v-bind:key="index"
                            :label="item"
                            :value="item">
                        </el-option>
                    </el-select>
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='jiaofujiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('shouji')?'required':''">手机：</div>
					<el-input  v-model="ruleForm.shouji"  autocomplete="off" placeholder="手机"  type="text"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='jiaofujiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('banjimingcheng')?'required':''">班级名称：</div>
					<el-input  v-model="ruleForm.banjimingcheng"  autocomplete="off" placeholder="班级名称"  type="text"  />
				</el-form-item>
				<el-form-item :style='{"width":"50%","padding":"0 0  0 80px","margin":"0 auto 15px","position":"relative","height":"auto"}' class="list-item" v-if="tableName=='jiaofujiaoshi'">
					<div v-if="true" :style='{"padding":"0 5px 0 0","color":"#818181","top":"0","left":"-130px","textAlign":"right","width":"130px","lineHeight":"44px","fontSize":"14px","position":"absolute"}' class="lable" :class="changeRules('touxiang')?'required':''">头像：</div>
                    <file-upload
                        tip="点击上传头像"
                        action="file/upload"
                        :limit="3"
                        :multiple="true"
                        :fileUrls="ruleForm.touxiang?ruleForm.touxiang:''"
                        @change="jiaofujiaoshitouxiangUploadChange"
                    ></file-upload>
				</el-form-item>
				<button :style='{"border":"0","cursor":"pointer","padding":"0 10px","margin":"20px auto 5px","outline":"none","color":"#fff","borderRadius":"8px","background":"#5CE5FB","display":"block","width":"60%","fontSize":"16px","height":"44px"}' type="button" class="r-btn" @click="login()">注册</button>
				<div :style='{"cursor":"pointer","padding":"0 10%","margin":"10px auto","color":"rgba(159, 159, 159, 1)","textAlign":"center","display":"inline-block","width":"60%","lineHeight":"1","fontSize":"12px"}' class="r-login" @click="close()">已有账号，直接登录</div>
			</el-form>
			
		</div>
	</div>
</template>

<script>
export default {
	data() {
		return {
			ruleForm: {
			},
			forgetForm: {},
            pageFlag : '',
			tableName:"",
			rules: {},
            xueyuanxingbieOptions: [],
            xueyuanbanjimingchengOptions: [],
            shoukejiaoshixingbieOptions: [],
            shoukejiaoshibanjimingchengOptions: [],
            jiaofujiaoshixingbieOptions: [],
		};
	},
	mounted(){
		this.pageFlag = this.$route.query.pageFlag
		if(this.$route.query.pageFlag=='register'){
			
			let table = this.$storage.get("loginTable");
			this.tableName = table;
			if(this.tableName=='xueyuan'){
				this.ruleForm = {
					xueyuanxuehao: '',
					mima: '',
					xueyuanxingming: '',
					xingbie: '',
					shouji: '',
					jifen: '0',
					banjimingcheng: '',
					touxiang: '',
					sfsh: '',
					shhf: '',
				}
			}
			if(this.tableName=='shoukejiaoshi'){
				this.ruleForm = {
					jiaoshigonghao: '',
					mima: '',
					jiaoshixingming: '',
					xingbie: '',
					shouji: '',
					banjimingcheng: '',
					touxiang: '',
				}
			}
			if(this.tableName=='jiaofujiaoshi'){
				this.ruleForm = {
					jiaofugonghao: '',
					mima: '',
					jiaofuxingming: '',
					xingbie: '',
					shouji: '',
					banjimingcheng: '',
					touxiang: '',
				}
			}
			if ('xueyuan' == this.tableName) {
				this.rules.xueyuanxuehao = [{ required: true, message: '请输入学员学号', trigger: 'blur' }]
			}
			if ('xueyuan' == this.tableName) {
				this.rules.mima = [{ required: true, message: '请输入密码', trigger: 'blur' }]
			}
			if ('xueyuan' == this.tableName) {
				this.rules.xueyuanxingming = [{ required: true, message: '请输入学员姓名', trigger: 'blur' }]
			}
			if ('xueyuan' == this.tableName) {
				this.rules.xingbie = [{ required: true, message: '请输入性别', trigger: 'blur' }]
			}
			if ('xueyuan' == this.tableName) {
				this.rules.shouji = [{ required: true, message: '请输入手机', trigger: 'blur' }]
			}
			if ('xueyuan' == this.tableName) {
				this.rules.banjimingcheng = [{ required: true, message: '请输入班级名称', trigger: 'blur' }]
			}
			if ('shoukejiaoshi' == this.tableName) {
				this.rules.jiaoshigonghao = [{ required: true, message: '请输入教师工号', trigger: 'blur' }]
			}
			if ('shoukejiaoshi' == this.tableName) {
				this.rules.mima = [{ required: true, message: '请输入密码', trigger: 'blur' }]
			}
			if ('shoukejiaoshi' == this.tableName) {
				this.rules.jiaoshixingming = [{ required: true, message: '请输入教师姓名', trigger: 'blur' }]
			}
			if ('shoukejiaoshi' == this.tableName) {
				this.rules.xingbie = [{ required: true, message: '请输入性别', trigger: 'blur' }]
			}
			if ('shoukejiaoshi' == this.tableName) {
				this.rules.shouji = [{ required: true, message: '请输入手机', trigger: 'blur' }]
			}
			if ('shoukejiaoshi' == this.tableName) {
				this.rules.banjimingcheng = [{ required: true, message: '请输入班级名称', trigger: 'blur' }]
			}
			if ('jiaofujiaoshi' == this.tableName) {
				this.rules.jiaofugonghao = [{ required: true, message: '请输入教辅工号', trigger: 'blur' }]
			}
			if ('jiaofujiaoshi' == this.tableName) {
				this.rules.mima = [{ required: true, message: '请输入密码', trigger: 'blur' }]
			}
			if ('jiaofujiaoshi' == this.tableName) {
				this.rules.jiaofuxingming = [{ required: true, message: '请输入教辅姓名', trigger: 'blur' }]
			}
			if ('jiaofujiaoshi' == this.tableName) {
				this.rules.xingbie = [{ required: true, message: '请输入性别', trigger: 'blur' }]
			}
			if ('jiaofujiaoshi' == this.tableName) {
				this.rules.shouji = [{ required: true, message: '请输入手机', trigger: 'blur' }]
			}
			if ('jiaofujiaoshi' == this.tableName) {
				this.rules.banjimingcheng = [{ required: true, message: '请输入班级名称', trigger: 'blur' }]
			}
			this.xueyuanxingbieOptions = "男,女".split(',')
			this.$http({
				url: `option/jiaoxueban/banjimingcheng`,
				method: "get"
			}).then(({ data }) => {
				if (data && data.code === 0) {
					this.xueyuanbanjimingchengOptions = data.data;
				} else {
					this.$message.error(data.msg);
				}
			});
			this.shoukejiaoshixingbieOptions = "男,女".split(',')
			this.$http({
				url: `option/jiaoxueban/banjimingcheng`,
				method: "get"
			}).then(({ data }) => {
				if (data && data.code === 0) {
					this.shoukejiaoshibanjimingchengOptions = data.data;
				} else {
					this.$message.error(data.msg);
				}
			});
			this.jiaofujiaoshixingbieOptions = "男,女".split(',')
		}
	},
	created() {
	},
	destroyed() {
		  	},
	methods: {
		changeRules(name){
			if(this.rules[name]){
				return true
			}
			return false
		},
		// 获取uuid
		getUUID () {
			return new Date().getTime();
		},
		close(){
			this.$router.push({ path: "/login" });
		},
        xueyuantouxiangUploadChange(fileUrls) {
            this.ruleForm.touxiang = fileUrls;
        },
        shoukejiaoshitouxiangUploadChange(fileUrls) {
            this.ruleForm.touxiang = fileUrls;
        },
        jiaofujiaoshitouxiangUploadChange(fileUrls) {
            this.ruleForm.touxiang = fileUrls;
        },

        // 多级联动参数


		// 注册
		login() {
			var url=this.tableName+"/register";
			  if(this.tableName=='xueyuan'){
				  this.ruleForm.sfsh = '待审核'
			  }
					if((!this.ruleForm.xueyuanxuehao) && `xueyuan` == this.tableName){
						this.$message.error(`学员学号不能为空`);
						return
					}
					if((!this.ruleForm.mima) && `xueyuan` == this.tableName){
						this.$message.error(`密码不能为空`);
						return
					}
					if((this.ruleForm.mima!=this.ruleForm.mima2) && `xueyuan` == this.tableName){
						this.$message.error(`两次密码输入不一致`);
						return
					}
					if((!this.ruleForm.xueyuanxingming) && `xueyuan` == this.tableName){
						this.$message.error(`学员姓名不能为空`);
						return
					}
					if((!this.ruleForm.xingbie) && `xueyuan` == this.tableName){
						this.$message.error(`性别不能为空`);
						return
					}
					if((!this.ruleForm.shouji) && `xueyuan` == this.tableName){
						this.$message.error(`手机不能为空`);
						return
					}
					if(`xueyuan` == this.tableName && this.ruleForm.shouji &&(!this.$validate.isMobile(this.ruleForm.shouji))){
						this.$message.error(`手机应输入手机格式`);
						return
					}
					if((!this.ruleForm.banjimingcheng) && `xueyuan` == this.tableName){
						this.$message.error(`班级名称不能为空`);
						return
					}
            if(this.ruleForm.touxiang!=null) {
                this.ruleForm.touxiang = this.ruleForm.touxiang.replace(new RegExp(this.$base.url,"g"),"");
            }
					if((!this.ruleForm.jiaoshigonghao) && `shoukejiaoshi` == this.tableName){
						this.$message.error(`教师工号不能为空`);
						return
					}
					if((!this.ruleForm.mima) && `shoukejiaoshi` == this.tableName){
						this.$message.error(`密码不能为空`);
						return
					}
					if((this.ruleForm.mima!=this.ruleForm.mima2) && `shoukejiaoshi` == this.tableName){
						this.$message.error(`两次密码输入不一致`);
						return
					}
					if((!this.ruleForm.jiaoshixingming) && `shoukejiaoshi` == this.tableName){
						this.$message.error(`教师姓名不能为空`);
						return
					}
					if((!this.ruleForm.xingbie) && `shoukejiaoshi` == this.tableName){
						this.$message.error(`性别不能为空`);
						return
					}
					if((!this.ruleForm.shouji) && `shoukejiaoshi` == this.tableName){
						this.$message.error(`手机不能为空`);
						return
					}
					if(`shoukejiaoshi` == this.tableName && this.ruleForm.shouji &&(!this.$validate.isMobile(this.ruleForm.shouji))){
						this.$message.error(`手机应输入手机格式`);
						return
					}
					if((!this.ruleForm.banjimingcheng) && `shoukejiaoshi` == this.tableName){
						this.$message.error(`班级名称不能为空`);
						return
					}
            if(this.ruleForm.touxiang!=null) {
                this.ruleForm.touxiang = this.ruleForm.touxiang.replace(new RegExp(this.$base.url,"g"),"");
            }
					if((!this.ruleForm.jiaofugonghao) && `jiaofujiaoshi` == this.tableName){
						this.$message.error(`教辅工号不能为空`);
						return
					}
					if((!this.ruleForm.mima) && `jiaofujiaoshi` == this.tableName){
						this.$message.error(`密码不能为空`);
						return
					}
					if((this.ruleForm.mima!=this.ruleForm.mima2) && `jiaofujiaoshi` == this.tableName){
						this.$message.error(`两次密码输入不一致`);
						return
					}
					if((!this.ruleForm.jiaofuxingming) && `jiaofujiaoshi` == this.tableName){
						this.$message.error(`教辅姓名不能为空`);
						return
					}
					if((!this.ruleForm.xingbie) && `jiaofujiaoshi` == this.tableName){
						this.$message.error(`性别不能为空`);
						return
					}
					if((!this.ruleForm.shouji) && `jiaofujiaoshi` == this.tableName){
						this.$message.error(`手机不能为空`);
						return
					}
					if(`jiaofujiaoshi` == this.tableName && this.ruleForm.shouji &&(!this.$validate.isMobile(this.ruleForm.shouji))){
						this.$message.error(`手机应输入手机格式`);
						return
					}
					if((!this.ruleForm.banjimingcheng) && `jiaofujiaoshi` == this.tableName){
						this.$message.error(`班级名称不能为空`);
						return
					}
            if(this.ruleForm.touxiang!=null) {
                this.ruleForm.touxiang = this.ruleForm.touxiang.replace(new RegExp(this.$base.url,"g"),"");
            }
			this.$http({
				url: url,
				method: "post",
				data:this.ruleForm
			}).then(({ data }) => {
				if (data && data.code === 0) {
					this.$message({
						message: "注册成功",
						type: "success",
						duration: 1500,
						onClose: () => {
							this.$router.replace({ path: "/login" });
						}
					});
				} else {
					this.$message.error(data.msg);
				}
			});
		}
	}
};
</script>

<style lang="scss" scoped>
	.container {
	  position: relative;
	  background: url(http://codegen.caihongy.cn/20231210/0fee9409214b41bfb94d032d3e1d9dbc.webp);

		.el-date-editor.el-input {
		  width: 100%;
		}
		
		.rgs-form .el-input /deep/ .el-input__inner {
						border: 1px solid #D7D7D7;
						border-radius: 8px;
						padding: 0 10px;
						color: #818181;
						width: 250px;
						font-size: 14px;
						height: 44px;
					}
		
		.rgs-form .el-select /deep/ .el-input__inner {
						border: 1px solid #D7D7D7;
						border-radius: 8px;
						padding: 0 10px;
						color: #818181;
						width: 250px;
						font-size: 14px;
						height: 44px;
					}
		
		.rgs-form .el-date-editor /deep/ .el-input__inner {
						border: 1px solid #D7D7D7;
						border-radius: 8px;
						padding: 0 10px 0 30px;
						color: #818181;
						width: 250px;
						font-size: 14px;
						height: 44px;
					}
		
		.rgs-form .el-date-editor /deep/ .el-input__inner {
						border: 1px solid #D7D7D7;
						border-radius: 8px;
						padding: 0 10px 0 30px;
						color: #818181;
						width: 250px;
						font-size: 14px;
						height: 44px;
					}
		
		.rgs-form /deep/ .el-upload--picture-card {
			background: transparent;
			border: 0;
			border-radius: 0;
			width: auto;
			height: auto;
			line-height: initial;
			vertical-align: middle;
		}
		
		.rgs-form /deep/ .upload .upload-img {
		  		  border: 1px dashed #D7D7D7;
		  		  cursor: pointer;
		  		  border-radius: 8px;
		  		  color: #aaa;
		  		  width: 100px;
		  		  font-size: 32px;
		  		  line-height: 80px;
		  		  text-align: center;
		  		  height: 80px;
		  		}
		
		.rgs-form /deep/ .el-upload-list .el-upload-list__item {
		  		  border: 1px dashed #D7D7D7;
		  		  cursor: pointer;
		  		  border-radius: 8px;
		  		  color: #aaa;
		  		  width: 100px;
		  		  font-size: 32px;
		  		  line-height: 80px;
		  		  text-align: center;
		  		  height: 80px;
		  		}
		
		.rgs-form /deep/ .el-upload .el-icon-plus {
		  		  border: 1px dashed #D7D7D7;
		  		  cursor: pointer;
		  		  border-radius: 8px;
		  		  color: #aaa;
		  		  width: 100px;
		  		  font-size: 32px;
		  		  line-height: 80px;
		  		  text-align: center;
		  		  height: 80px;
		  		}
	}
	.required {
		position: relative;
	}
	.required::after{
				color: red;
				top: 4px;
				position: absolute;
				right: 5px;
				content: "*";
			}
	.editor>.avatar-uploader {
		line-height: 0;
		height: 0;
	}
</style>
